<template>
	<view class="list">
		<!-- 列表 -->
		<LoadMore ref="LoadMore" id="LoadMore" :token="true" :diffHeight="0" :initData="initData"
			@dataRefresh='dataRefresh'>
			<view v-for="(item,index) in dataList" :key="index" class="data_list" @click="goNext('/pages/integral/paytype?id='+item.id)">
				<view class="flex-row-between">
					<view class="font-969696 font13">{{item.createtime?item.createtime:'-'}}</view>
					<view class="flex-row-start">
						<view class="font-ff6428 font13">{{item.status == 'centel'?'已取消':item.pay_status==1?'支付成功':'未支付'}}</view>
						<uni-icons type="arrowright" size="14" color="#000000" style="margin: 6rpx 0 0 10rpx;"></uni-icons>
					</view>
				</view>
				<view class="data_info flex-row-between">
					<image :src="imgPath+item.goods_info.images" mode=""></image>
					<view class="is_info flex-column-between">
						<view class="font-1e1e1e font14 font-b">{{item.goods_info.name}}</view>
						<view class="font-969696 font12 tr">x{{item.goods_number}}</view>
						<view class="font-969696 font12 tr">{{item.goods_info.score}}积分+¥{{item.goods_info.price}}</view>
					</view>
				</view>
				<view class="font-1e1e1e tr">
					<text class="font11">实付：</text>
					<text class="font15 font-b">{{item.all_score}}积分+¥{{item.price}}</text>
				</view>
				<view class="flex-row-between">
					<view></view>
					<!-- <view class="bnt">查看物流</view> -->
				</view>
			</view>
		</LoadMore>
	</view>
</template>

<script>
	import LoadMore from "@/components/j-loadMore/index.vue";
	export default {
		components: {
			LoadMore
		},
		data() {
			return {
				// 传参数据
				initData: {
					url: 'scoreorderList',
					param: {
						name: '',
						date: ''
					}
				},
				dataList:[],
				imgPath: this.$Config.http_static, // 图片头
			}
		},
		onLoad() {},
		methods: {
			// LoadMore返回列表数据
			dataRefresh(e){
				e.forEach(item=>{
					item.all_score = this.$base.numAdd(item.score, item.crs_score)
				})
				this.dataList = e
			},
			//跳转
			goNext(url) {
				this.$Router.push(url)
			}
		}
	}
</script>

<style lang="less">
.list{
	background-color: #f5f5f5;
	.data_list{
		width: 700rpx;background-color: #ffffff;border-radius: 10px;margin: 25rpx 25rpx 0 25rpx;
		padding: 28rpx 20rpx;
		.data_info{
			height: 152rpx;width: 660rpx;margin: 50rpx 0 30rpx 0;
			image{
				height: 152rpx;width: 152rpx;
			}
			.is_info{
				width: 508rpx;padding-left: 30rpx;height: 152rpx;
				view{
					width: 478rpx;
				};
			}
		}
		.bnt{
			width: 150rpx;height: 50rpx;border-radius: 25rpx;border: solid 2rpx #c8c8c8;
			color: #646464;font-size: 24rpx;line-height: 50rpx;text-align: center;margin-top: 30rpx;
		}
	}
}
</style>